home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / SAT 2.4.0 & updates ƒ / SAT-TCL and demo / SATTest / CSATTestApp.p next >
Encoding:
Text File  |  1995-12-18  |  2.4 KB  |  85 lines  |  [TEXT/PJMM]

  1. {****************************************************}
  2. {}
  3. {        CSATTestApp.p                                                                                                                                                                                                }
  4. {}
  5. {        Application methods for the SATTest application.                                                                                            }
  6. {}
  7. {        Copyright © 1995 by Patrick C Hew. All rights reserved.                                                                }
  8. {}
  9. {****************************************************}
  10.  
  11.  
  12. unit CSATTestApp;
  13.  
  14. interface
  15.  
  16.     uses
  17.         TCL, SATTestIntf;
  18.  
  19. implementation
  20.  
  21.     const
  22.         kExtraMasters = 4;            (* number of extra master pointer blocks *)
  23.         kRainyDay = 32000;            (* total rainy day memory reserve size     *)
  24.         kCriticalBalance = 30000;    (* portion of rainy day for critical operations *)
  25.         kToolboxBalance = 20000;    (* portion of rainy day for toolbox reserve *)
  26.  
  27.  
  28. {****************************************************}
  29. {}
  30. {        ISATTestApp                                                                                                                                                                                                        }
  31. {}
  32. {        Standard initialization method. See TCL Starter project for explanation of the    }
  33. {        parameters.                                                                                                                                                                                                        }
  34. {}
  35. {****************************************************}
  36.  
  37.     procedure CSATTestApp.ISATTestApp;
  38.  
  39.     begin { ISATTestApp }
  40.         IApplication(kExtraMasters, kRainyDay, kCriticalBalance, kToolboxBalance);
  41.     end; { ISATTestApp }
  42.  
  43.  
  44. {****************************************************}
  45. {}
  46. {        DoCommand                                                                                                                                                                                                            }
  47. {}
  48. {        Use SATReportStr to put up a simple about box, if desired.                                                            }
  49. {}
  50. {****************************************************}
  51.  
  52.     procedure CSATTestApp.DoCommand (theCommand: longint);
  53.  
  54.     begin { DoCommand }
  55.         if theCommand = cmdAbout then begin
  56.                 SATReportStr('Sprite Animation Toolkit 2.3b4 used with the THINK Class Library 1.1.2 (Pascal).');
  57.             end; { if }
  58.         inherited DoCommand(theCommand);        { to handle other commands    }
  59.     end; { DoCommand }
  60.  
  61.  
  62. {****************************************************}
  63. {}
  64. {        StartUpAction                                                                                                                                                                                                    }
  65. {}
  66. {        Create the main director and select its window.                                                                                                }
  67. {}
  68. {****************************************************}
  69.  
  70.     procedure CSATTestApp.StartUpAction (numPreloads: Integer);
  71.  
  72.         var
  73.             theSATDirector: CSATTestDirector;
  74.  
  75.     begin { StartupAction }
  76.         new(theSATDirector);
  77.         theSATDirector.ISATTestDirector(SELF);
  78.         theSATDirector.BuildWindow;
  79.         theSATDirector.SetUpSprites;
  80.         theSATDirector.SetUpSounds;
  81.         theSATDirector.GetWindow.Select;
  82.     end; { StartupAction }
  83.  
  84.  
  85. end. { CSATTestApp }